package com.wyq.domain.myexception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @version 1.0
 * @Author
 * @Date 2024/10/27 16:09
 */
@RestControllerAdvice
public class MyException {

    @ExceptionHandler
    public String error(Exception e){
        System.out.println("e = " + e);
        return "error";
    }

}
